import { Component, OnInit } from '@angular/core';
import { TreeNode } from '@iux/live';

@Component({
  selector: 'app-demo3',
  templateUrl: './demo3.component.html',
  styles: [
    `
      .treeselect-container {
        width: 3.68rem;
      }
      .selection {
        margin-top: 0.08rem;
      }
      .selection span {
        padding-right: 0.08rem;
      }
    `,
  ],
})
export class Demo3Component implements OnInit {
  treeData: TreeNode[];
  selection: TreeNode[];

  constructor() {}

  ngOnInit() {
    // 树
    this.treeData = [
      {
        label: 'Documents-disabled',
        disabled: true,
        children: [
          {
            label: 'Expenses.doc',
            isLeaf: true,
          },
          {
            label: 'Resume.doc',
            isLeaf: true,
          },
        ],
      },
      {
        label: 'Word',
        children: [
          {
            label: 'Expenses.doc',
            isLeaf: true,
          },
          {
            label: 'Resume.doc',
            isLeaf: true,
          },
        ],
      },
      {
        label: 'Pictures',
        children: [
          {
            label: 'logo.png',
            isLeaf: true,
          },
          {
            label: 'banner.pnd',
            isLeaf: true,
          },
        ],
      },
    ];
  }
}
